how to use map to render array